Release 10.1A: OpenEdge Development:
Programming Interfaces
Creating a dynamic temp-table with XML Schema
A dynamic temp-table needs its definition supplied before it can be put into a
PREPAREDstate for reading data. UsingREAD-XMLSCHEMA( )on a temp- table with no definition creates the definition from the XMl Schema. The method then places the temp-table in thePREPAREDstate. This code example does several things:The read and write XML methods have many parameters. To make the code samples in this chapter more readable, each parameter is represented by a descriptively named variable. All these variable definitions are stored in an include file, shown below:
Here is the code sample:
The code displays the following:
![]()
In this next version, a non-Progress generated XML Schema file will be used to create a new dynamic temp-table. The schema is very similar to the
Feedbacktable of the Sports2000 database. The purpose of this example is to demonstrate mapping an XML Schema field to something more useful for your Progress application.Here is the
ttFeedback.xsdfile:
Elements with the XMl Schema type “string” are mapped to
CHARACTERfields by default.Here is the code that maps the
Commentsfield to aCLOB:
Here is the code sample output:
![]()
|
Copyright © 2005 Progress Software Corporation www.progress.com Voice: (781) 280-4000 Fax: (781) 280-4095 |